package com.example.xyblog.mapper;

import com.example.xyblog.Model.Articleinfo;
import com.example.xyblog.Model.Userinfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ArticleMapper {

    public List<Articleinfo> getMyList(@Param("uid")Integer uid);

    public Articleinfo getBlog(@Param("id") Integer id);

    public List<Articleinfo> getAll();

    public Articleinfo getBlogById(@Param("id") Integer id);

    public int update(@Param("title") String title,
                      @Param("content") String content,
                      @Param("aid") Integer aid,
                      @Param("states")Integer states);


    /**
     * 修改点赞数
     * 这是一个键盘的测试
     */
    public int updateThumb(@Param("num")Integer num
                            ,@Param("id")Integer id);

    public int editArt(@Param("title")String title,
                       @Param("content")String content,
                       @Param("uid")Integer uid,
                       @Param("state")Integer state);

    public List<Articleinfo> getCut(@Param("psize") Integer psize,
                                    @Param("pindex")Integer pindex);
}
